import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home.vue'
import Order from '../views/order.vue'
import My from '../views/my.vue'
import Category from '../views/category.vue'
import Index from '../views/Second/index.vue'
import AbroadIndex from '../views/Second/abroadIndex.vue'
import InternalIndex from '../views/Second/internalIndex.vue'
import da from '../views/Second/tired/da.vue'
import db from '../views/Second/tired/db.vue'
import dc from '../views/Second/tired/dc.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/category'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/order',
    name: 'order',
    component: Order
  }, 
  {
    path: '/my',
    name: 'my',
    component: My
  }, 
  {
    path: '/category',
    name: 'category',
    component: Category,
    children:[
      {
        path:'index',
        name:'index',
        component:Index
      },
      {
        path:'abroadIndex',
        name:'abroadIndex',
        component:AbroadIndex,
        children:[
          {
            path:'da',
            name:'da',
            component:da
          },
          {
            path:'db',
            name:'db',
            component:db
          },
          {
            path:'dc',
            name:'dc',
            component:dc
          },
        ]
      },
      {
        path:'internalIndex',
        name:'internalIndex',
        component:InternalIndex
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
